package model

import (
	"gorm.io/gorm"
)

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(30)"json:"username"`
	Phone    string `gorm:"type:varchar(30)"json:"phone"`
	Password string `gorm:"type:varchar(100)"json:"password"`
}

type Video struct {
	gorm.Model
	Title   string `gorm:"type:varchar(50)"json:"title"`
	Desc    string `gorm:"type:varchar(100)"json:"desc"`
	Address string `gorm:"type:varchar(30)"json:"address"`
}

type Label struct {
	gorm.Model
	Address string `gorm:"type:varchar(50)"json:"address"`
	Subject string `gorm:"type:varchar(30)"json:"subject"`
	Att     string `gorm:"type:varchar(30)"json:"att"`
}

type Table struct {
	gorm.Model
	Watch string `gorm:"type:varchar(30)"json:"watch"`
	Like  int    `gorm:"type:int"json:"like"`
	Score string `gorm:"type:varchar(30)"json:"score"`
}

type Watch struct {
	gorm.Model
	Name     string `gorm:"type:varchar(30)"json:"name"`
	Duration string `gorm:"type:varchar(30)"json:"duration"`
	PutDate  string `gorm:"type:varchar(30)"json:"putDate"`
	Collect  int    `gorm:"type:int"json:"collect"`
}

type Member struct {
	gorm.Model
	Type string `gorm:"type:varchar(30)"json:"type"`
	Vip  string `gorm:"type:varchar(30)"json:"vip"`
}

type Score struct {
	gorm.Model
	VideoId int    `form:"type:int"json:"videoId"`
	Score   string `form:"type:varchar(30)"json:"score"`
}
